Integrand size = 25, antiderivative size = 222 \[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=-\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}+\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),2\right )}{3 d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {3963, 3957, 2952, 2715, 2720, 2644, 327, 335, 218, 212, 209, 2646} \[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}}-\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),2\right )}{3 d e \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}} \]
[In]
[Out]
Rule 209
Rule 212
Rule 218
Rule 327
Rule 335
Rule 2644
Rule 2646
Rule 2715
Rule 2720
Rule 2952
Rule 3957
Rule 3963
Rubi steps \begin{align*} \text {integral}& = \frac {\int (a+a \sec (c+d x))^2 \sin ^{\frac {3}{2}}(c+d x) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {\int (-a-a \cos (c+d x))^2 \sec ^2(c+d x) \sin ^{\frac {3}{2}}(c+d x) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {\int \left (a^2 \sin ^{\frac {3}{2}}(c+d x)+2 a^2 \sec (c+d x) \sin ^{\frac {3}{2}}(c+d x)+a^2 \sec ^2(c+d x) \sin ^{\frac {3}{2}}(c+d x)\right ) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {a^2 \int \sin ^{\frac {3}{2}}(c+d x) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \int \sec ^2(c+d x) \sin ^{\frac {3}{2}}(c+d x) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \int \sec (c+d x) \sin ^{\frac {3}{2}}(c+d x) \, dx}{e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \int \frac {1}{\sqrt {\sin (c+d x)}} \, dx}{3 e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}-\frac {a^2 \int \frac {1}{\sqrt {\sin (c+d x)}} \, dx}{2 e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {x^{3/2}}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),2\right )}{3 d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1-x^2\right )} \, dx,x,\sin (c+d x)\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),2\right )}{3 d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (4 a^2\right ) \text {Subst}\left (\int \frac {1}{1-x^4} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),2\right )}{3 d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {4 a^2}{d e \sqrt {e \csc (c+d x)}}-\frac {2 a^2 \cos (c+d x)}{3 d e \sqrt {e \csc (c+d x)}}+\frac {a^2 \sec (c+d x)}{d e \sqrt {e \csc (c+d x)}}+\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}-\frac {a^2 \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),2\right )}{3 d e \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 15.71 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.74 \[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\frac {2 a^2 \cos ^4\left (\frac {1}{2} (c+d x)\right ) \sqrt {e \csc (c+d x)} \sec ^4\left (\frac {1}{2} \csc ^{-1}(\csc (c+d x))\right ) \left (3-6 \sqrt {\cos ^2(c+d x)} \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},1,\frac {3}{4},\csc ^2(c+d x)\right )+3 \sqrt {-\cot ^2(c+d x)} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},\csc ^2(c+d x)\right )+\sqrt {-\cot ^2(c+d x)} \operatorname {Hypergeometric2F1}\left (-\frac {3}{4},\frac {3}{2},\frac {1}{4},\csc ^2(c+d x)\right ) \sin ^2(c+d x)\right ) \tan (c+d x)}{3 d e^2} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 12.70 (sec) , antiderivative size = 810, normalized size of antiderivative = 3.65
method | result | size |
parts | \(\text {Expression too large to display}\) | \(810\) |
default | \(\text {Expression too large to display}\) | \(1083\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.43 (sec) , antiderivative size = 724, normalized size of antiderivative = 3.26 \[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\left [-\frac {6 \, a^{2} \sqrt {-e} \arctan \left (-\frac {{\left (\cos \left (d x + c\right )^{2} - 6 \, \sin \left (d x + c\right ) - 2\right )} \sqrt {-e} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, {\left (e \sin \left (d x + c\right ) + e\right )}}\right ) \cos \left (d x + c\right ) + 3 \, a^{2} \sqrt {-e} \cos \left (d x + c\right ) \log \left (\frac {e \cos \left (d x + c\right )^{4} - 72 \, e \cos \left (d x + c\right )^{2} - 8 \, {\left (\cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{2} + {\left (7 \, \cos \left (d x + c\right )^{2} - 8\right )} \sin \left (d x + c\right ) + 8\right )} \sqrt {-e} \sqrt {\frac {e}{\sin \left (d x + c\right )}} + 28 \, {\left (e \cos \left (d x + c\right )^{2} - 2 \, e\right )} \sin \left (d x + c\right ) + 72 \, e}{\cos \left (d x + c\right )^{4} - 8 \, \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) + 8}\right ) - 2 i \, a^{2} \sqrt {2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 2 i \, a^{2} \sqrt {-2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 4 \, {\left (2 \, a^{2} \cos \left (d x + c\right )^{2} + 12 \, a^{2} \cos \left (d x + c\right ) - 3 \, a^{2}\right )} \sqrt {\frac {e}{\sin \left (d x + c\right )}} \sin \left (d x + c\right )}{12 \, d e^{2} \cos \left (d x + c\right )}, -\frac {6 \, a^{2} \sqrt {e} \arctan \left (\frac {{\left (\cos \left (d x + c\right )^{2} + 6 \, \sin \left (d x + c\right ) - 2\right )} \sqrt {e} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, {\left (e \sin \left (d x + c\right ) - e\right )}}\right ) \cos \left (d x + c\right ) - 3 \, a^{2} \sqrt {e} \cos \left (d x + c\right ) \log \left (\frac {e \cos \left (d x + c\right )^{4} - 72 \, e \cos \left (d x + c\right )^{2} + 8 \, {\left (\cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{2} - {\left (7 \, \cos \left (d x + c\right )^{2} - 8\right )} \sin \left (d x + c\right ) + 8\right )} \sqrt {e} \sqrt {\frac {e}{\sin \left (d x + c\right )}} - 28 \, {\left (e \cos \left (d x + c\right )^{2} - 2 \, e\right )} \sin \left (d x + c\right ) + 72 \, e}{\cos \left (d x + c\right )^{4} - 8 \, \cos \left (d x + c\right )^{2} + 4 \, {\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) + 8}\right ) - 2 i \, a^{2} \sqrt {2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 2 i \, a^{2} \sqrt {-2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 4 \, {\left (2 \, a^{2} \cos \left (d x + c\right )^{2} + 12 \, a^{2} \cos \left (d x + c\right ) - 3 \, a^{2}\right )} \sqrt {\frac {e}{\sin \left (d x + c\right )}} \sin \left (d x + c\right )}{12 \, d e^{2} \cos \left (d x + c\right )}\right ] \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=a^{2} \left (\int \frac {1}{\left (e \csc {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx + \int \frac {2 \sec {\left (c + d x \right )}}{\left (e \csc {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx + \int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (e \csc {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\left (e \csc \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\left (e \csc \left (d x + c\right )\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+a \sec (c+d x))^2}{(e \csc (c+d x))^{3/2}} \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2}{{\left (\frac {e}{\sin \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
[In]
[Out]